package com.arrogames.rgblabyrinth.menu {
	import feathers.controls.Label;
	import feathers.controls.Screen;
	
	import starling.animation.IAnimatable;
	import starling.core.Starling;
	
	public class LoadApplicationScreen extends Screen implements IAnimatable {

		private var label:Label;
		
		private var FREQUENCY:int = 3;
		
		public function LoadApplicationScreen() {
			super();
		}
		
		override protected function initialize():void {
			super.initialize();
			label = new Label();
			label.x = 400;
			label.y = 300;
			label.text = "Loading 0%";
			this.addChild( label );
			
			Starling.juggler.add(this);
			
		}
		
		public function setProgress(ratio:Number):void {
			label.text = "Loading "+(ratio*100).toPrecision(2)+"%";
		}
		
		public function advanceTime(time:Number):void {
			
		}
		
		public override function dispose():void {
			Starling.juggler.remove(this);
		}
		
	}
}